package com.xy.api.service.mainData;

import com.xy.api.model.dto.mainData.VendorDTO;
import com.xy.api.model.request.mainData.VendorProductRequest;
import com.xy.api.model.request.mainData.VendorRequest;
import com.xy.api.model.response.Rows;

import java.util.List;
import java.util.Map;

/**
 * 供货商
 */
public interface IVendorService {

    /**
     * 列表查询
     *
     * @param request
     * @return
     */
    Rows<VendorDTO> queryVendorList(VendorRequest request);

    /**
     * 查询所有供应商
     *
     * @return
     */
    Rows<VendorDTO> queryAllVendorList();

    /**
     * 详情
     *
     * @param id
     * @return
     */
    VendorDTO vendorDetail(Long id);

    /**
     * 编辑
     *
     * @param request
     */
    VendorDTO editVendor(VendorDTO request);

    /**
     * 删除
     *
     * @param id
     */
    void deleteVendor(Long id);

    /**
     * 删除供应商下的产品
     *
     * @param request
     */
    void deleteVendorProduct(VendorProductRequest request);

    /**
     * 根据ID查询供货商
     *
     * @param vendorIds 供货商ID
     * @return
     */
    Map<Long, VendorDTO> getVendorByIds(List<Long> vendorIds);

}
